Just add class="widefat"
to your input fields.
have a look for instance into the code of the default textwidget in /wp-includes/default-widgets.php:
class WP_Widget_Text extends WP_Widget {
function __construct() {
$widget_ops = array('classname' => 'widget_text', 'description' => __('Arbitrary text or HTML'));
$control_ops = array('width' => 400, 'height' => 350);
parent::__construct('text', __('Text'), $widget_ops, $control_ops);
}
and http://codex.wordpress.org/Widgets_API#Developing_Widgets