How to tell if a ceiling junction box is braced to hold the weight of a ceiling fan?
If the box was installed recently in accordance with National Electrical Code (NEC), the box should be labeled if it's rated to support a ceiling fan.


  NEC 2008
  314.27 Outlet Boxes.
  (D) Boxes at Ceiling-Suspended (Paddle) Fan Outlets. Outlet boxes or outlet box systems used as the sole support of a ceiling-suspended
  (paddle) fan shall be listed, shall be marked by their manufacturer as
  suitable for this purpose, and shall not support ceiling-suspended
  (paddle) fans that weigh more than 32 kg (70 lb). For outlet boxes or
  outlet box systems designed to support ceiling-suspended (paddle) fans
  that weigh more than 16 kg (35 lb), the required marking shall include
  the maximum weight to be supported.


If it's not labeled, the box is still required to support at least 50 lbs.


  314.27 Outlet Boxes.
  (A) Boxes at Luminaire Outlets. Boxes used at luminaire or lampholder outlets in a ceiling shall be designed for the purpose and shall be required to support a luminaire weighing a minimum of 23 kg (50 lb). Boxes used at luminaire or lampholder outlets in a wall shall be designed for the purpose and shall be marked to indicate the maximum weight of the luminaire that is permitted to be supported by the box in the wall, if other than 23 kg (50 lb). At every outlet used exclusively for lighting, the box shall be designed or installed so that a luminaire may be attached.


If the box was installed before this code was adopted; or in an area that does not follow NEC, you'll likely have to cut/drill some exploratory holes to determine if the box is properly braced.