A scanner is a useful tool (No! Not another purchase!) as it will help you hear where the trains are. Check local regulations, though, as some areas prevent a scanner from being installed in a vehicle. This will allow you to better use your time as you won't wait for a train to appear only to be disappointed when one fails to materialize.
As for more general tips, the most important is to stay on public property and never trespass. Stay a bit away from the tracks in case of a derailment, loose load/securement strap, or other hazard when filming from grade crossings. Bringing a book or other form of entertainment is useful in the lulls, but be aware of your surroundings, particularly in some of the seedier areas that railroads tend to frequent.
Unfortunately, some may view you as suspicious when you take pictures. Know your rights, and if someone begins to harass you, the safest course of action is usually to leave. A membership to Friends of BNSF or Amtrak's equivalent (whose name I am blanking on) may help establish your intentions with those who are curious.