As mentioned above, many packages can do this job. (Biopython, Bioperl , Biojava, Bio3D, MMTK, Pymol, VMD, Chimera, YASARA, etc., ) and - the popular secondary structure calculation tools namely DSSP & Stride outputs phi/psi angles.
There is also a well established, fast code written in C, called torsions.c
Another good program called Dangle, a java-code also provides this along with the other torsion angles including side chain torsions (chi1, chi2, chi3 etc., ) - this is from Richardson's lab who has created MolProbity (that extensively checks the goodness of a protein structure based on allowed regions in Ramachandran space & clashes etc.,)
PRODY, a very good package developed in the past 2-3 years (since the previous posting & answers) also does this phi/psi calculation well.
Another tool, part of the pdb-tools package available on Google Code, also has a python script for this calculation!
There is also an option to call R from Python/Perl, then you can get tremendous advantages of wide range of R package, Regarding your question you can look at Bio3d package