You are not alone in seeing this problem; the Apple discussion Hello, my iMac's wifi icon has an x in it and I cannot access wireless wifi on it, … has attracted a couple of answers.
Linc Davis's answer suggests the following possible cause and a multi-step solution:
Sometimes the Wi-Fi icon in the menu bar may falsely indicate that Wi-Fi is unavailable. That could happen if you switch between network locations, one of which doesn't have a Wi-Fi service.
Open the Network pane in System Preferences. A list of available network services appears on the left.
If Wi-Fi is in the list, select it, then from the popup menu labeled with a gear icon at the bottom of the list, select Make Service Active. Click Apply.
If Wi-Fi is not in the service list, click the plus-sign button at the bottom of the list, and then select Wi-Fi from the Interface menu in the sheet that drops down. Click Create, then Apply.
If there is a closed padlock icon in the lower left corner of the preference pane, click it and enter your administrator password to unlock the settings.
If the above steps don't solve the problem, Linc goes on to suggest deleting the computer's /Library/Preferences/SystemConfiguration/com.apple.airport.preferences.plist
file and restarting.
Full instructions are in the discussion.