There certainly are pros and cons on this issue. Presently, there is not a great deal of legal guidance to the best of my knowledge, either, with the exception of the patient's right to not know, which really dictates the present state of affairs.
Why should nurses know the HIV status of their patients? First, it is difficult to see how a nurse can provide proper care without knowing everything about the patient's medical condition. Imagine treating someone with hepatitis and not knowing the patient has it. Or imagine treating someone with diabetes without knowing. HIV-positive status seems no different to me. The nurse needs to know to provide care. Second, in spite of the fact that a nurse should be using all required precautions, it is possible that a nurse can be exposed to the virus, with a needle stick, for example. The nurse who is at risk like this will want to be tested for HIV, in six-month intervals, and if he or she has no knowledge of the transmission risk, the nurse will not know the testing is needed. Third, there are some who think that medical personnel should have a choice as to whether or not to treat someone who is HIV-positive, and this choice is not an option if the nurse does not know one way or another. Personally, I think this is an unethical position to take, that being in health care should mean treating everyone, no matter what the condition is, but realistically, there are people who have this opinion.
There are, of course, arguments to be made for not knowing. One is that this removes the problem of picking and choosing among patients, allowing everyone to be treated. Another is that not knowing provides less discrimination in care. Sadly, there are those who judge people who are HIV-positive, assuming that gay transmission is the only sort of transmission, and judging the patient for that reason. Also, there are those who will speculate that the transmission was through drug use and judge that as well. It is dreadful to think that nursing care would inadequate for a reason like this, but the fact is, if no one knows the patient's status, no one can make that judgement. A third reason is that the patient has a right to not be tested for HIV. This is a personal decision that everyone gets to make for him or herself. If nurses were required to have this knowledge, that would interfere with the patient's right to not be tested and to not know. Finally, when a nurse knows someone's HIV status, there is a risk that he or she will share that knowledge with someone who does not know, a HIPPA violation, to be sure, but one that can and does happen, for example, by inadvertently saying something to a visiting family member.
So, all things considered, there are many pros and cons, probably more than I have discussed here. But the patient's right to not know presently trumps all other reasons, in my opinion, and as long as that remains the right of the patient, this is a theoretical concern.