There is no singular way to determine whether a trade is beneficial or detrimental to your team, but a number of factors should be considered. First, it's important to evaluate your roster and place in your league before making a trade. In which categories do you need help? Are there others in which you're comfortably ahead and can spare some production?
If you feel that your team has a chance to win the championship or make a push for the playoffs, take note of your deficient categories and try to acquire a player, or players, who can help narrow the gap.
It's also important to consider risk when making trades, particularly as it pertains to injuries. You might be able to obtain a superior player, but if he's injury prone and misses 15 games down the stretch, it could tank your season.
Also be sure to separate name value from fantasy value. Another owner may offer you an All-Star-caliber player who's averaging 25 points per game, but if you're already doing well in the points category, and the player doesn't add much value in other categories, trading for him doesn't offer much of a reward. In general, targeting well-rounded players is a rule of thumb.