Why is the upstairs a lot hotter in a 2 story duplex?
Since hot rises, upper stories will tend to be warmer unless the design of your air conditioning system properly compensates for it.    An energy audit, as mentioned in the comments by @mikes will tell you if you have any reasons for heat gain that may be correctable.

Assuming you have a single thermostat that controls a unit that supplies both levels, here are some other factors to consider:


Make sure you have a clean filter.   A dirty filter will lower the overall efficiency of the unit.
Make sure that supply and return ducts are open on the upper floor; it's possible that supply ducts were closed during heating season due to excess heat in that area; return ducts may be blocked by furniture.
Check for dampers in the ductwork that leads to the upstairs.   It's possible that flow to the upper level was restricted to balance the system for heating system.    If you change a damper, note the position beforehand, you may wan to return to that setting for heating season (manually operated dampers usually have a small lever on the outside of the duct -- parallel to the airflow is "open", perpendicular is "closed")
Running the system fan full-time (rather than just when the compressor is running) may help to even out the distribution of cool air.
If you have rooms downstairs that are too cool, you might close or partially close a small number of supply ducts to improve air flow to the upstairs.   Note that you should not close many ducts without consulting with a knowledgeable HVAC person, as you could restrict airflow too much, making the unit run less efficiently.
If your stairway has a door, leaving it open may help to allow air to circulate more freely between levels (especially if you don't have adequate return ductwork to the upper floor)
Last, consider having a qualified HVAC specialist evaluate your system  to ensure the ductwork is adequate.