Object selection box in addon
Building off of the answer by @CoDEmanX, here's a simple example:

import bpy    

class OBJECT_PT_HelloWorldPanel(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "Hello World Panel"
    bl_idname = "OBJECT_PT_hello"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"

    def draw(self, context):
        layout = self.layout
        scene = context.scene               
        layout.prop_search(scene, "theChosenObject", scene, "objects")


def register():
    bpy.utils.register_module(__name__)
    bpy.types.Scene.theChosenObject = bpy.props.StringProperty()


def unregister():
    bpy.utils.unregister_module(__name__)
    del bpy.types.Object.theChosenObject


if __name__ == "__main__":
    register()


which gives:



How script works

The prop_search command lets the user choose one item from a bpy "collection" (in this case, the collection context.scene.objects) and saves the name of that item into a string (the string context.scene.theChosenObject).

If you need to use the object in a different part of script.  Use 

scene = context.scene
obj = scene.objects[scene.theChosenObject]


By the way, if you had wanted a "Materials Selection Box", you could have used

layout.prop_search(scene, "theChosenMaterial", bpy.data, "materials")


and similarly for textures, meshes, or any other bpy collection.

Limitations

We are only saving the name of the object (for example, scene.theChosenObject could be 'Cube').  If the user changes the name of the object, scene.theChosenObject will not change and you will not be able to use it to reference the object anymore.

See here for more on this problem.