How to define customized property in Material?
I believe all you need are bpy.props properties. The first example even demonstrates it for bpy.types.Material. Here's an extended example, that uses some additional options for a FloatProperty and adds it above the Material list in Material tab, so you can try it out:

import bpy

def draw_func(self, context):
    layout = self.layout
    ob = context.object
    layout.prop(ob.active_material, "my_material")

def register():
    bpy.types.Material.my_material = bpy.props.FloatProperty(
        name="My Material Property",
        min=0.0,
        max=10.0,
        default=5.0,
        subtype='FACTOR'
    )
    bpy.types.MATERIAL_PT_context_material.prepend(draw_func)

def unregister():
    del bpy.types.Material.my_material
    bpy.types.MATERIAL_PT_context_material.remove(draw_func)


if __name__ == "__main__":
    register()


You can add your custom properties to a full, custom panel too of course.

If you need to add plenty of properties, use a property group and a PointerProperty to organize them better (and avoid name conflicts with existing properties).

If you need a varying number of a group of properties, use a PropertyGroup to define the properties per occurrence and supply it to a CollectionProperty as type.