I believe computer equipment was originally beige because all other office equipment at the time was beige (fax machines, copiers, electric typewriters, etc.)
This begs the question "why was all the existing non-pc equipment beige?". This is most likely because it is a neutral colour that would fit in well with the colour schemes in various office environments.
As for the change to black, I assume one or two manufactures decided to modernize the look and feel their equipment to make it stand out. The same reason mice and mice buttons were square and are now mostly rounded.
For us now, black looks good and seems modern. twenty years from now all our computer equipment may be orange.