If you have anti virus software installed, disable that.
Turn off the Firewall in System Preferences > Security & Privacy (or just Security)
Third party apps such as those mentioned here > Mac App Store: Sign in sheet does not appear, or does not accept typed text can prevent access to the App Store.
If you have Little Snitch or Growl installed, same thing.
Which Mac OS X do you have installed?
I know navigating these forums can be a challenge. I assumed you were referring to apps for the Mac OS X since you posted in the Using Mac App Store forum.
Try resetting ..
Tap Settings > General > Reset > Reset All Settings
You won't lose any data and your iPhone may restart on it's own several timees. Just let it go through the processs.. perhaps a minute or two.
Then tap Settings > Store then tap View Apple ID
See if you can enter your credentials.